xen,pod: Zero-check recently populated pages (checklast)
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 28 Jun 2012 14:18:03 +0000 (15:18 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 28 Jun 2012 14:18:03 +0000 (15:18 +0100)
commit5a6a7ae5e6d79a72dc6b0b94f39441e64f664193
tree5ac7e1dfddf263e982a5a4b276b6bb7cbc62a772
parenta8a3ef6318f5fedaf539c77d00db37ef5a7ea7fc
xen,pod: Zero-check recently populated pages (checklast)

When demand-populating pages due to guest accesses, check recently populated
pages to see if we can reclaim them for the cache.  This should keep the PoD
cache filled when the start-of-day scrubber is going through.

The number 128 was chosen by experiment.  Windows does its page
scrubbing in parallel; while a small nubmer like 4 works well for
single VMs, it breaks down as multiple vcpus are scrubbing different
pages in parallel.  Increasing to 128 works well for higher numbers of
vcpus.

v2:
 - Wrapped some long lines
 - unsigned int for index, unsigned long for array
v3:
 - Use PAGE_ORDER_2M instead of 9
 - Removed inappropriate use of p2m_pod_zero_check_superpage() return value

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/p2m-pod.c
xen/include/asm-x86/p2m.h